package natsio

import (
	"gitee.com/liukexing/mqbroker/core/typedef"
	"github.com/nats-io/go-nats"
)

type NatsHandle struct {
	handel typedef.MessageHandle
}

func (c *NatsHandle) HandleMessage(msg *nats.Msg) {
	data, ok := c.handel.Praise(msg.Data)
	if ok {
		return
	}
	c.handel.Process(data)
}
